package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.domain.SystemLog;
import cn.wolfcode.crm.query.QueryObject;
import cn.wolfcode.crm.service.ISystemLogService;
import cn.wolfcode.crm.util.JsonResult;
import cn.wolfcode.crm.util.PageResult;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("systemLog")
public class SystemLogController {

    @Autowired
    private ISystemLogService systemLogService;

    @RequestMapping("view")
    @RequiresPermissions(value = {"systemLog:view","部门页面"},logical = Logical.OR)
    public String view() throws Exception{

        return "systemLog/systemLog";
    }


    @RequestMapping("list")
    @ResponseBody
    public PageResult list(QueryObject qo) throws Exception{
        PageResult query = systemLogService.query(qo);


        return query;
    }

}
